import { getToken } from '@/utils/auth';
import { Navigate, Outlet } from '@umijs/max';

export default () => {
  if (getToken()) {
    return <Outlet />;
  } else {
    return <Navigate to="/login"></Navigate>;
  }
};
